home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / gt_power / gth035.zip / GT-INST.BAT < prev    next >
DOS Batch File  |  1990-11-12  |  7KB  |  181 lines

  1. set %gth%=gth-035
  2. echo off
  3. cls
  4. if not "%3." == "." goto argok
  5. echo .
  6. echo GT-INST is for installing GT Host from scratch.
  7. echo Use it with 3 or 4 arguments, eg
  8. echo .
  9. echo             ┌───────────────────────── Where to install GT and GT-HELP
  10. echo             │        ┌──────────────── Where to find your zip files
  11. echo             │        │                    (could be A: for floppy)
  12. echo             │        │         ┌────── Where to install message bases
  13. echo             │        │         │    ┌─ If you have a Colour Screen
  14. echo           ┌─┴─┐ ┌────┴────┐ ┌──┴──┐ │
  15. echo   GT-INST C:\GT D:\TMP\ZIPS E:\MSGS C
  16. echo .
  17. echo This would create a directory C:\GT and install GT and %gth% there
  18. echo using zip files in D:\TMP\ZIPS.
  19. echo .
  20. echo ╔═════════════════════════════════════════╗
  21. Echo ║ You will need :                         ║
  22. echo ║    PKUNZIP somewhere in your DOS path   ║
  23. echo ║    GT1550_2.ZIP or GR1550_2.ZIP         ║
  24. echo ║    %gth%.ZIP                          ║
  25. echo ║    An EDITOR (eg Qedit)                 ║
  26. echo ╚═════════════════════════════════════════╝
  27. echo .
  28. echo Important : you must have a drive prefix (eg C:) on all parameters.
  29. goto instdone
  30. :argok
  31. set inst_psave=%path%
  32. echo ┌──────────────────────────────────────────────────────
  33. echo │ You wish to install GT in directory %1
  34. echo │ using zips on drive or directory %2
  35. echo │ with SYSOP and GENERAL message bases built from %3
  36. echo └──────────────────────────────────────────────────────
  37. echo Important : you must have a drive prefix (eg C:) on these parameters.
  38. echo **If anything is wrong, press CTRL-C Now**
  39. echo .
  40. pause
  41. cls
  42. echo ╔══════════════════════════════════════════════════════════
  43. echo ║ About to create default directories:
  44. echo ╟──────────────────────────────────────────────────────────
  45. echo ║      %1          for main GT directory
  46. echo ║      %1\DOC      for GT documents
  47. echo ║      %1\CAP      for GT capture files
  48. echo ║      %1\DOWN     for files you download or users upload
  49. echo ║      %1\TXT      for scripts and phone directories
  50. echo ║      %1\BULLETS  for system bulletins
  51. echo ║      %1\HLP      for GT-HELP text files
  52. echo ║      %1\MM       for MMR (and GT-HELP) control files
  53. echo ║      %3          as root directory for message bases
  54. echo ║      %3\GENERAL  for general message base
  55. echo ║      %3\SYSOP    for sysop message area
  56. echo ╟──────────────────────────────────────────────────────────
  57. echo ║ You can change these later, but you might have to read the docs.
  58. echo ╚══════════════════════════════════════════════════════════
  59. echo As this is a simple batch file, it cannot do much checking.
  60. echo Where "Strike a key" appears, if the previous operation displayed
  61. echo an unexpected error message, you should press CTRL-C to terminate.
  62. echo .
  63. echo If the message Unable to Create Directory appears it probably just means
  64. echo the directory has already been created - if so, you can ignore that.
  65. echo .
  66. pause
  67. md %1
  68. md %1\DOC
  69. md %1\MM
  70. md %1\HLP
  71. md %1\CAP
  72. md %1\DOWN
  73. md %1\TXT
  74. md %1\BULLETS
  75. md %3
  76. md %3\GENERAL
  77. md %3\SYSOP
  78. cd %1
  79. echo .
  80. echo ┌──────────────────────────────────────────
  81. echo │ About to unzip %2\G?1550_2.ZIP to %1
  82. echo └──────────────────────────────────────────
  83. pause
  84. pkunzip -n %2\G?1550_2.ZIP %1\ *.EXE GT.WIN SYSOP.BBS
  85. echo .
  86. echo ┌──────────────────────────────────────────
  87. echo │ About to create sample host text files to %1
  88. echo └──────────────────────────────────────────
  89. pause
  90. rem
  91. if exist %1\gtmdir.bbs goto gtmskip
  92. echo Z %3\SYSOP Sysop Messages >> %1\gtmdir.bbs
  93. echo X %3\GENERAL General Messages >> %1\gtmdir.bbs
  94. :gtmskip
  95. rem
  96. if exist %1\gtdir.bbs goto gtdskip
  97. echo Z %1\BULLETS System Bulletins >> %1\gtdir.bbs
  98. :gtdskip
  99. rem
  100. pkunzip -n %2\G?1550_5.ZIP %1\ *.BAT *.?BS *.MAC *.SCR
  101. echo .
  102. echo ┌──────────────────────────────────────────
  103. echo │ About to unzip host docs to %1\DOC
  104. echo └──────────────────────────────────────────
  105. pause
  106. pkunzip -n %2\G?1550_2.ZIP %1\DOC\ *.1ST *.DOC *.GT
  107. pkunzip -n %2\G?1550_5.ZIP %1\DOC\ *.DOC
  108. echo .
  109. echo ┌──────────────────────────────────────────
  110. echo │ About to unzip %gth% to %1 and %1\HLP
  111. echo │ and create default %1\HOST.BAT and %1\txt\GT.DIR files.
  112. echo └──────────────────────────────────────────
  113. pause
  114. pkunzip -n %2\%gth%.ZIP %1\ *.exe *.com
  115. pkunzip -n %2\%gth%.ZIP %1\HLP *.hlp *.dir *.cnf *.scr *.mst *.mdm
  116. if not exist %1\gt.cnf copy %1\hlp\gth-base.cnf %1\gt.cnf
  117. echo DP=%1\TXT >> %1\gt.cnf
  118. echo TP=%1\DOWN >> %1\gt.cnf
  119. echo SP=%1\TXT >> %1\gt.cnf
  120. echo CP=%1\CAP >> %1\gt.cnf
  121. echo MP=%1\GENERAL >> %1\gt.cnf
  122. echo SM=%1\SYSOP >> %1\gt.cnf
  123. echo DD=%1\BULLETS >> %1\gt.cnf
  124. echo LO=%1 >> %1\gt.cnf
  125. rem
  126. if "%4." == "C." goto notmono
  127. if "%4." == "c." goto notmono
  128. type %1\hlp\mono.cnf >> %1\gt.cnf
  129. :notmono
  130. rem
  131. if not exist %1\txt\gt.dir copy %1\hlp\gt.dir %1\txt\gt.dir
  132. if not exist %1\txt\host.scr copy %1\host.scr %1\txt\host.scr
  133. echo set gtpath=%1 > %1\host.bat
  134. if exist %1\GT1550.EXE echo gt1550 /R2 host.scr >> %1\host.bat
  135. if exist %1\GR1550.EXE echo gr1550 /R2 host.scr >> %1\host.bat
  136. echo if errorlevel 255 host >> %1\host.bat
  137. echo if errorlevel 6 netmail >> %1\host.bat
  138. copy %1\hlp\config.scr %1\txt
  139. del %1\hlp\config.scr
  140. echo .
  141. echo ┌───────────────────────────────────────────────────────────────────────┐
  142. echo │ About to start GT-HELP - you will need to configure the FULL path     │
  143. echo │ of your editor.  Then you can read the instructions for running       │
  144. echo │ GT-HELP and have a quick look through the setup files.                │
  145. echo └───────────────────────────────────────────────────────────────────────┘
  146. echo ps - this will add %1 *temporarily* to your DOS path and create a
  147. echo      GTPATH environment variable, but you'll need to add it yourself
  148. echo      (to \autoexec.bat or elsewhere) before the next reboot.
  149. echo .
  150. pause
  151. set path=%1;%path%
  152. set gtpath=%1
  153. GTH
  154. cls
  155. echo .
  156. echo ╔══════════════════════════════════════════════════════════════════════
  157. echo ║ About to start GT in terminal mode - using the ALT-I command to
  158. echo ║ check the COM port, modem init strings etc.
  159. echo ╟──────────────────────────────────────────────────────────────────────
  160. echo ║ From here you might need to read the GT manual
  161. echo ║ (you'll find it in the %1\DOC directory {grin}).
  162. echo ╚══════════════════════════════════════════════════════════════════════
  163. echo .
  164. pause
  165. if exist %1\GT1550.EXE gt1550 config
  166. if exist %1\GR1550.EXE gr1550 config
  167. cls
  168. echo .
  169. echo ╔═════════════════════════════════════════════════════════════
  170. echo ║ Installation done -- restoring path to %inst_psave%
  171. echo ╟─────────────────────────────────────────────────────────────
  172. echo ║ Remember to include %1 in path (eg in \autoexec.bat) before running again
  173. echo ╚═════════════════════════════════════════════════════════════
  174. echo .
  175. echo    To execute GT-HELP, type GTH
  176. echo    To execute GT in HOST mode, type HOST
  177. echo .
  178. set path=%inst_psave%
  179. set gth=
  180. :instdone
  181.